package com.fs.base.param;

import java.util.HashMap;
import java.util.Map;

/**
 * @author TiddlerCJ
 * @desc 系统基础常量
 */
public class SysConstant {
	/**
	 * UTF-8编码
	 */
	public static final String  UTF_8 = "UTF-8";
	
	/**
	 * 超级管理员账号
	 */
	public static final String SUPER_ADMIN_ACOUNT = "sysAdm";
	
	/**
	 * 短信通用角色
	 */
	public static final String SMS_ROLE = "SMS_ROLE";
	
	/**
	 * 
	 */
	public static final String SESSION_CONSOLE_USER = "SESSION_USER";
	
	/**
	 * 
	 */
	public static final String SESSION_CONSOLE_MENU = "SESSION_MENU";
	/**
	 * 
	 */
	public static final String SESSION_CONSOLE_MENU_MOTION = "SESSION_MENU_MOTION";
	
	
	public static final String SESSION_WEB_USER = "SESSION_WEB_USER";
	
	public static final String PARAM_MENU_MOTIONS = "PARAM_MENU_MOTIONS";
	
	/**
	 * 注册码
	 */
	public static final String REGISTER_CODE = "registerCode";
	
	/**
	 * 模块类名对应关系
	 */
	public static final Map<String, String> MODLE_CLASSNAME = new HashMap<String, String>(); 
	
	/**
	 * 用户id-nickName
	 */
	public static final Map<String, String> USERS_ID_NAME_MAP = new HashMap<String, String>(); 
	/**
	 * 组织机构
	 */
	public static final Map<String, String> ORG_NO_NAME_MAP = new HashMap<String, String>(); 
	
	/**
	 * 员工id-name
	 */
	//public static final Map<String, String> EMPLOYEE_ID_NAME_MAP = new HashMap<String, String>(); 
	
	/**
	 * 数据过滤标示
	 */
	public static final String RIGHT_CONTROL = "rightControl";
	
	/**
	 * 审批用户配置表
	 */
	public static final Map<String, String> USER_CONFIG_MAP = new HashMap<String, String>(); 
	
	/**
	 * 通过value获取key
	 * @param map
	 * @param value
	 * @return
	 */
	public static String getKey(Map<String,String> map,String value){
        String key = null;
        for(String getKey: map.keySet()){
            if(map.get(getKey).equals(value)){
                key = getKey;
            }
        }
        return key;
    }
}
